home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / SGATE / OEMSETUP.INF < prev   
INI File  |  1996-07-31  |  60KB  |  1,555 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3.  
  4. [PlatformsSupported]
  5.     MCA
  6.     ISA
  7.     EISA
  8.     "Jazz-Internal Bus"
  9.  
  10. [LanguagesSupported]
  11.     ENG
  12.  
  13. [Options]
  14.     aclser
  15.  
  16. [AdapterInfo]
  17.     aclser     = "ACL/Avanstar Family",    aclser,     aclser    ;DEL   0 1
  18.  
  19. [FileConstants]
  20.     ExitState   = "Active"
  21.     OldVersionExisted = $(FALSE)
  22.     HdwDriverComponentExists = $(FALSE)
  23.     DriverPath      = $(!STF_NTPATH)"\drivers"
  24.     UtilityInf     = "UTILITY.INF"
  25.     subroutninf    = "SUBROUTN.INF"
  26. ;DEL    ParamInf        = "NCPARAM.INF"
  27.     HandleNull   = ""
  28.     ACLCONF_HANDLE = $(HandleNull)
  29.     AdapterList = ^(AdapterInfo,0)
  30.     AdapterTitleList = ^(AdapterInfo, 1)
  31.     AdapterHardwareNameList = ^(AdapterInfo, 2)
  32.     AdapterHardwareDriverList = ^(AdapterInfo, 3)
  33. ;DEL AdapterHardwareTypeList = ^(AdapterInfo, 4)
  34.     AdapterTitle = *($(AdapterTitleList), ~($(AdapterList), $(Option)))
  35.     AdapterHardwareName = *($(AdapterHardwareNameList), ~($(AdapterList), $(Option)))
  36.     AdapterHardwareDriver = *($(AdapterHardwareDriverList), ~($(AdapterList), $(Option)))
  37. ;DEL AdapterHardwareType = *($(AdapterHardwareTypeList), ~($(AdapterList), $(Option)))
  38.     AdapterRule = *($(AdapterHardwareDriverList), ~($(AdapterList), $(Option)))
  39.     AdapterServiceName = ""
  40.     AdapterName = ""    ; aclser0, ...
  41.  
  42.     NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  43.     IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  44.     Manufacturer    = "StarGate"
  45.     SoftwareType    = "driver"
  46.  
  47.     ProductMajorVersionHdwDriver     = "1"
  48.     ProductMinorVersionHdwDriver     = "18"
  49.     ProductVersionHdwDriver  = $(ProductMajorVersionHdwDriver)"."$(ProductMinorVersionHdwDriver)
  50.     ProductSoftwareNameHdwDriver = $(AdapterHardwareDriver)
  51.     ProductSoftwareImagePathHdwDriver = "%SystemRoot%\System32\drivers\"$(AdapterHardwareDriver)".sys"
  52.     NetRuleSoftwareTypeHdwDriver     = $(AdapterHardwareDriver)"sys "$(AdapterHardwareDriver)"Driver"
  53.     NetRuleSoftwareUseHdwDriver      = $(SoftwareType)
  54.     NetRuleSoftwareBindFormHdwDriver = """"$(AdapterHardwareDriver)"Driver"" yes no container"
  55.     NetRuleSoftwareClassHdwDriver    = {$(AdapterHardwareDriver)"Driver basic"}
  56.     NetRuleSoftwareHiddenHdwDriver   = 1
  57.     NetRuleHardwareType     = $(AdapterRule)" "$(AdapterRule)"Adapter"
  58.     NetRuleHardwareBindForm = " yes yes container"
  59.     NetRuleHardwareClass    = {$(AdapterHardwareDriver)"Adapter basic"}
  60.     ProductHardwareName         = $(AdapterHardwareDriver)
  61.     AdapterParameters = {}
  62.  
  63.     ProductKeyNameHdwDriver  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareNameHdwDriver)"\CurrentVersion"
  64.     ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  65.  
  66. [GeneralConstants]
  67.     ExitCodeOk     = 0
  68.     ExitCodeCancel = 1
  69.     ExitCodeFatal  = 2
  70.     KeyNull         = ""
  71.     MAXIMUM_ALLOWED   = 33554432
  72.     RegistryErrorIndex = NO_ERROR
  73.     KeyProduct      = ""
  74.     KeyParameters   = ""
  75.     TRUE         = 1
  76.     FALSE        = 0
  77.     NoTitle      = 0
  78.     fRemoveACL     = TRUE
  79.  
  80. [DebugOptions]
  81.     !DebugOutputControl = 1
  82.  
  83. [UiVars]
  84. from      = ""
  85. to        = ""
  86.     !STF_NTDRIVE        = ""
  87.     !STF_NTPATH         = ""
  88.     !STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  89.     !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  90.     !STF_FLOPPYLIST     = {} ? $(!LIBHANDLE) GetFloppyDriveLetters
  91.     !STF_UNUSEDDRIVES   = {} ? $(!LIBHANDLE) GetUnusedDrives
  92.     !STF_LANGUAGE       = "ENG"
  93.     VolumeList      = {} ? $(!LIBHANDLE) GetHardDriveLetters
  94.     VolumeFreeList  = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  95.     VolumeFSList    = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  96.     DestVolume      = ""
  97.     MinHelpID   = 25000
  98.     MaxHelpID   = 25999
  99.  
  100. [date]
  101.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  102.  
  103. [Identify]
  104.     read-syms Identification
  105.     set Status     = STATUS_SUCCESSFUL
  106.     set Identifier = $(OptionType)
  107.     set Media      = #("Source Media Descriptions", 1, 1)
  108.     Return $(Status) $(Identifier) $(Media)
  109.  
  110. [ReturnOptions]
  111.     set Status        = STATUS_FAILED
  112.     set OptionList     = {}
  113.     set OptionTextList = {}
  114.     set LanguageList = ^(LanguagesSupported, 1)
  115.     Ifcontains(i) $($0) in $(LanguageList)
  116.         ifstr(i) $($1) == ""
  117.             goto returnoptions
  118.         endif
  119.         set PlatformList = ^(PlatformsSupported, 1)
  120.         Ifcontains(i) $($1) in $(PlatformList)
  121.             goto returnoptions
  122.         else
  123.             set Status = STATUS_NOTSUPPORTED
  124.             goto finish_ReturnOptions
  125.         endif
  126.     Else
  127.         set Status = STATUS_NOLANGUAGE
  128.         goto finish_ReturnOptions
  129.     Endif
  130. returnoptions = +
  131.     set OptionList     = ^(Options, 1)
  132.     set OptionTextList = ^(OptionsText$($0), 1)
  133.     set Status         = STATUS_SUCCESSFUL
  134. finish_ReturnOptions = +
  135.     Return $(Status) $(OptionList) $(OptionTextList)
  136.  
  137. ;DEL beg
  138. ;[Shell Commands]
  139. ;    read-syms DebugOptions
  140. ;    set-title "Serial Setup"
  141. ;    set-subst LF = "\n"
  142. ;    set Exit_Code = $(ExitCodeOk)
  143. ;    Debug-Output "OEMNIO8P.INF: STF_CWDDIR is "$(!STF_CWDDIR)
  144. ;    Debug-Output "OEMNIO8P.INF: STF_RANFROM is "$(!STF_RANFROM)
  145. ;    ifstr(i) $(!STF_RANFROM) != ""
  146. ;        ifstr(i) $(!STF_RANFROM) != $(!STF_CWDDIR)"SERIAL\"
  147. ;           set !STF_SRCDIR = $(!STF_RANFROM)
  148. ;        endif
  149. ;    endif
  150. ;    LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  151. ;    shell "" InstallOption ENG Specialix $(!STF_SRCDIR)
  152. ;    FreeLibrary $(!LIBHANDLE)
  153. ;    set Status = $($R0)
  154. ;    Return $(Status)
  155. ;DEL end
  156.  
  157.  
  158. [InstallOption]
  159.     read-syms DebugOptions
  160.     Debug-Output "OEMNACL.INF: In [InstallOption] section"
  161.     set Status = STATUS_FAILED
  162.     set Option    = $($1)
  163.     set SrcDir    = $($2)
  164.     set AddCopy   = $($3)
  165.     set DoCopy    = $($4)
  166.     set DoConfig  = $($5)
  167.     set !SourceDir = $($2)
  168. ;    ifstr SrcDir == "A:\"
  169. ;        ifstr $(!STF_SRCDIR_OVERRIDE) == ""
  170. ;        set !STF_SRCDIR_OVERRIDE = $(!STF_CWDDIR)
  171. ;        endif
  172. ;    endif
  173.     read-syms GeneralConstants
  174.     read-syms FileConstants
  175. ;    Debug-Output "Calling GetBusTypeNum"
  176.     Shell $(UtilityInf), GetBusTypeNum
  177.     set BusTypeNum = $($R1)
  178.     Debug-Output "BusTypeNum = "$(BusTypeNum)
  179.     Debug-Output "OEMNACL.INF: Language = "$($0)
  180.     Debug-Output "OEMNACL.INF: OptionID = "$($1)
  181.     Debug-Output "OEMNACL.INF: SourceDirectory = "$($2)
  182.     Debug-Output "OEMNACL.INF: AddCopy = "$(AddCopy)
  183.     Debug-Output "OEMNACL.INF: DoCopy = "$(DoCopy)
  184.     Debug-Output "OEMNACL.INF: DoConfig = "$(DoConfig)
  185.     Debug-Output "OEMNACL.INF: Media = "$(Media)
  186.     set LanguageList = ^(LanguagesSupported, 1)
  187.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  188.         Debug-Output "OEMNACL.INF: returning STATUS_NO_LANGUAGE"
  189.         return STATUS_NOLANGUAGE
  190.     Endif
  191.     set-subst LF = "\n"
  192.     Debug-Output "OEMNACL.INF: AdapterTitle = "$(AdapterTitle)
  193.     Debug-Output "OEMNACL.INF: AdapterHardwareName = "$(AdapterHardwareName)
  194.     Debug-Output "OEMNACL.INF: AdapterHardwareDriver = "$(AdapterHardwareDriver)
  195.  
  196.     read-syms BindingInfo-$(AdapterHardwareDriver)
  197.     set NetRuleSoftwareBindableHdwDriver = $(BindingInfo)
  198. ;    Debug-Output "OEMNACL.INF: BindingInfo = "$(BindingInfo)
  199.     read-syms DialogConstants$(!STF_LANGUAGE)
  200.     ifstr(i) $(!NTN_Origination) == "NCPA"
  201.         set Continue = "OK"
  202.     endif
  203.     read-syms FileConstants$(!STF_LANGUAGE)
  204.     detect date
  205.     Debug-Output "OEMNACL.INF: date = "$(Now)
  206.     set-title  $(FunctionTitle)
  207.     set to   = Begin
  208.     set from = Begin
  209.     set CommonStatus = STATUS_SUCCESSFUL
  210.     EndWait
  211. Begin = +
  212.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  213.         set StartLabel = removeadapter
  214.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  215.         set StartLabel = UpgradeSoftware
  216.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  217.         set StartLabel = bindingadapter
  218.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  219.         set StartLabel = getAdapterSettings
  220.  
  221.         Ifstr(i) $(ProductKeyNameHdwDriver) == $(!NTN_RegBase)
  222.             Debug-Output "This should not have happened!  Cannot configure the "$(AdapterHardwareName)" driver software."
  223.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  224.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  225.                 Debug-Output "ShellCode error: cannot get an error string."
  226.                 goto ShellCodeError
  227.             endif
  228.             set Error = $($R0)
  229.             set from = end
  230.             set to = end
  231.             goto nonfatalinfo
  232.         endif
  233. ;DEL pd        Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  234.         Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  235.             Debug-Output "Shell code error: DoAskSource"
  236.             Goto ShellCodeError
  237.         Else-Ifstr(i) $($R0) == STATUS_FAILED
  238.             Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  239.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  240.                 goto ShellCodeError
  241.             endif
  242.             set Error = $($R0)
  243.             Goto fatal
  244.         Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  245.             set CommonStatus = STATUS_USERCANCEL
  246.             Goto successful
  247.         Endif
  248.         Set SrcDir = $($R1)
  249.         install Correct-SrcDir
  250.         Debug-Output "We need to determine how to find out which adapter"
  251.         Debug-Output "  we should be configuring!!!!!!"
  252.         set from = writeparameters
  253.         Debug-Output "setting from = "$(from)
  254.     else
  255.         set StartLabel = installadapter
  256.         set OEM_ABANDON_OPTIONS = {}
  257.         set OEM_ABANDON_SOFTWARE = FALSE
  258.         set OEM_ABANDON_ON = TRUE
  259.     endif
  260. ;    Debug-Output "OEMNACL.INF: Option is: "$(Option)
  261.     set to = $(fatal)
  262.     Goto $(StartLabel)
  263.  
  264. installadapter = +
  265.     Debug-Output "******************Entering installadapter******************"
  266.  
  267.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyNameHdwDriver) +
  268.                $(MAXIMUM_ALLOWED) KeyProductHdwDriver
  269.     Debug-Output "ProductKeyNameHdwDriver = "$(ProductKeyNameHdwDriver)
  270.     Debug-Output "KeyProductHdwDriver =    "$(KeyProductHdwDriver)
  271.  
  272.     Ifstr $(KeyProductHdwDriver) != $(KeyNull)
  273.         CloseRegKey $(KeyProductHdwDriver)
  274.         Shell $(UtilityInf), CardExistedDlg
  275.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  276.             Debug-Output "ShellCode error: --One adapter all ready exists, install another-- FAILED."
  277.             goto ShellCodeError
  278.         endif
  279.         ifstr(i) $($R1) != "OK"
  280.             goto end
  281.         endif
  282.         set HdwDriverComponentExists = $(TRUE)
  283.         set OldVersionExisted = $(TRUE)
  284.     EndIf
  285.  
  286.     goto skipoptions
  287.  
  288. skipoptions = +
  289.     Debug-Output "******************Entering skipoptions******************"
  290.  
  291.     ifint $(HdwDriverComponentExists) == $(TRUE)
  292.         ifstr(i) $(!NTN_InstallMode) == configure
  293.             goto getAdapterSettings
  294.         endif
  295.     endif
  296.  
  297.     StartWait
  298.  
  299. ;---------------------------------------------------- VIV  8/31/1993 begin
  300.     ifstr(i) $(!NTN_InstallMode) == "install"
  301.         ;
  302.         ; Get Number to add to Hardware Driver.
  303.         ;
  304.         shell $(UtilityInf) AssignAdapterNumber
  305.  
  306.         set AdapterName = $(ProductHardwareName)$($R1)
  307.  
  308.         Debug-Output "OEMNACL.INF: AdapterName = "$(AdapterName)
  309.     endif
  310. ;---------------------------------------------------- VIV  8/31/1993 end
  311.  
  312.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  313.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  314.         Debug-Output "Shell code error: DoAskSource"
  315.         Goto ShellCodeError
  316.     Else-Ifstr(i) $($R0) == STATUS_FAILED
  317.         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  318.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  319.             goto ShellCodeError
  320.         endif
  321.         set Error = $($R0)
  322.         Goto fatal
  323.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  324.         set CommonStatus = STATUS_USERCANCEL
  325.         Goto successful
  326.     Endif
  327.     Set SrcDir = $($R1)
  328.     install Correct-SrcDir
  329.     ifint $(HdwDriverComponentExists) == $(FALSE)
  330.         ifstr(i) $(!NTN_InstallMode) == "install"
  331.                ;
  332.                ; Ask for source to copy.
  333.                ;
  334.                Ifstr(i) $(DoCopy) == "YES"
  335.             Endif
  336.                Debug-Output "OEMNACL.INF: SrcDir = "$(SrcDir)
  337.  
  338.             ;
  339.             ; Expand and copy files to the windows directory
  340.             ;
  341.             install "Install-Option"
  342.                Debug-Output "OEMNACL.INF: STF_INSTALL_OUTCOME = "$(STF_INSTALL_OUTCOME)
  343.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  344.                   Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  345.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  346.                       goto ShellCodeError
  347.                   endif
  348.                   set Error = $($R0)
  349.                   goto fatal
  350.             endif
  351.  
  352.         LoadLibrary "a" $(!STF_WINDOWSSYSPATH)"\"aclconf.dll ACLCONF_HANDLE
  353.  
  354.         ;
  355.         ; Copy the Control Programs that have already been expanded
  356.         ; to the Registry
  357.         ;
  358.             LibraryProcedure Result, $(ACLCONF_HANDLE), +
  359.                             ACLPutCPDataToRegistry, +
  360.                             $(!STF_WINDOWSSYSPATH)"\", +
  361.                             $(ParamKeyName), +
  362.                             $(BusTypeNum)
  363.         ;
  364.         ; Remove the Control Programs from windows directory
  365.         ;
  366.         set RemoveList = {}
  367.         set CPList = ^( Files-CP, 2 )
  368.            ForListDo $(CPList)
  369.                 set RemoveList = >($(RemoveList), $(!STF_WINDOWSSYSPATH)\$($))
  370.            EndForListDo
  371.         ForListDo $(RemoveList)
  372.                 LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  373.         EndForListDo
  374.         endif
  375.     endif
  376.     set from = addHdwDriverComponent
  377.  
  378.     goto getAdapterSettings
  379.  
  380.  
  381. addHdwDriverComponent = +
  382.     Debug-Output "******************Entering addHdwDriverComponent******************"
  383.  
  384.     set ACLSpecificString = $(AdapterHardwareName)
  385.     Ifint $(HdwDriverComponentExists) == $(TRUE)
  386.         goto addAdapterComponent
  387.     Endif
  388.     ;
  389.     ; Add hives: \SOFTWARE\StarGate\aclser\CurrentVersion and ...\NetRules
  390.     ;
  391.     Debug-Output "OEMNACL.INF: Adding HdwDriverComponent"
  392.     set TypeofService = "kernelautostart"
  393.     set ServiceOrderGroup = "Extended base"
  394.     set Dependencies = {}
  395.     set ObjectName = ""
  396.     set TypeSupported = "7"
  397.     set EventLogLocation = "System"
  398.     set ErrorControlValue = 1
  399.  
  400.     Shell $(UtilityInf), AddSoftwareComponent, +
  401.                                 $(Manufacturer), +
  402.                                 $(ProductSoftwareNameHdwDriver), +
  403.                                 $(ProductSoftwareNameHdwDriver), +
  404.                                 $(ProductSoftwareTitleHdwDriver), +
  405.                                 $(STF_CONTEXTINFNAME), +
  406.                                 $(ProductSoftwareImagePathHdwDriver), +
  407.                                 $(TypeofService), +
  408.                                 $(ServiceOrderGroup), +
  409.                                 $(Dependencies), +
  410.                                 $(ObjectName), +
  411.                                 $(IoLogMsgDLL)";"$(ProductSoftwareImagePathHdwDriver), +
  412.                                 $(TypeSupported), +
  413.                                 $(EventLogLocation), +
  414.                                 $(ErrorControlValue)
  415.  
  416.     Set OEM_ABANDON_SOFTWARE = TRUE
  417.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  418.         Debug-Output "ShellCode error: AddSoftwareComponent FAILED! -- "$(ProductSoftwareNameHdwDriver)
  419.         goto ShellCodeError
  420.     endif
  421.     set RegistryErrorIndex = $($R0)
  422.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  423.         EndWait
  424.         Debug-Output "Registry error: add software components"
  425.         CloseRegKey $($R1)
  426.         CloseRegKey $($R2)
  427.         CloseRegKey $($R3)
  428.         CloseRegKey $($R4)
  429.         CloseRegKey $($R5)
  430.         goto fatalregistry
  431.     endif
  432.     Set SoftProductKey      = $($R1)
  433.     Set SoftNetRuleKey      = $($R2)
  434.     Set SoftServiceKey      = $($R3)
  435.     Set SoftParameterKey    = $($R4)
  436.     Set SoftLinkageKey      = $($R5)
  437.     ;
  438.     ; Add values for \SOFTWARE\StarGate\aclser\CurrentVersion
  439.     ;
  440.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  441.                         {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersionHdwDriver)},+
  442.                         {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersionHdwDriver)},+
  443.                         {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitleHdwDriver)},+
  444.                         {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescriptionHdwDriver)},+
  445.                         {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareNameHdwDriver)},+
  446.                         {hidden,$(NoTitle),$(!REG_VT_DWORD),$(NetRuleSoftwareHiddenHdwDriver)}, +
  447.                         {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  448.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  449.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  450.         Debug-Output "ShellCode error: AddValueList FAILED!  -- "$(SoftProductKey)
  451.         goto ShellCodeError
  452.     endif
  453.     set RegistryErrorIndex = $($R0)
  454.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  455.         EndWait
  456.         Debug-Output "Resgitry error: add value list."
  457.         CloseRegKey $(SoftProductKey)
  458.         CloseRegKey $(SoftNetRuleKey)
  459.         CloseRegKey $(SoftServiceKey)
  460.         CloseRegKey $(SoftParameterKey)
  461.         CloseRegKey $(SoftLinkageKey)
  462.         goto fatalregistry
  463.     endif
  464.     ;
  465.     ; Add values for \SOFTWARE\StarGate\aclser\CurrentVersion\NetRules
  466.     ;
  467.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareTypeHdwDriver)},+
  468.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUseHdwDriver)}, +
  469.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindFormHdwDriver)}, +
  470.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClassHdwDriver)}, +
  471.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindableHdwDriver)}, +
  472.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  473.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  474.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  475.         Debug-Output "ShellCode error. AddValueList FAILED!  -- "$(SoftNetRuleKey)
  476.         goto ShellCodeError
  477.     endif
  478.     set RegistryErrorIndex = $($R0)
  479.     FlushRegKey $(SoftProductKey)
  480.     FlushRegKey $(SoftNetRuleKey)
  481.     FlushRegKey $(SoftServiceKey)
  482.     FlushRegKey $(SoftParameterKey)
  483.     FlushRegKey $(SoftLinkageKey)
  484.     CloseRegKey $(SoftProductKey)
  485.     CloseRegKey $(SoftNetRuleKey)
  486.     CloseRegKey $(SoftServiceKey)
  487.     CloseRegKey $(SoftParameterKey)
  488.     CloseRegKey $(SoftLinkageKey)
  489.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  490.         EndWait
  491.         Debug-Output "Registry error: add value list."
  492.         goto fatalregistry
  493.     endif
  494.  
  495. addAdapterComponent = +
  496.     Debug-Output "******************Entering addAdapterComponent******************"
  497.     ;
  498.     ; Add hives: \SOFTWARE\Microsoft\...\NetworkCards\0... and ...\NetRules
  499.     ;
  500.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName), +
  501.                          $(STF_CONTEXTINFNAME), $(ProductKeyNameHdwDriver)
  502.     ifint $($R4) != -1
  503.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  504.     endif
  505.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  506.         Debug-Output "Cannot add hardware component!"
  507.         goto ShellCodeError
  508.     endif
  509.  
  510.     set RegistryErrorIndex = $($R0)
  511.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  512.         EndWait
  513.         Debug-Output "Registry error: add hardware component"
  514.         Debug-Output $(RegistryErrorIndex)
  515.         CloseRegKey $($R1)
  516.         CloseRegKey $($R2)
  517.         CloseRegKey $($R3)
  518.         goto fatalregistry
  519.     endif
  520.     ;
  521.     ; Add values for \SOFTWARE\Microsoft\NetworkCards\0...
  522.     ;
  523.     set KeyParameters = $($R3)
  524.     set KeyAdapterRules = $($R2)
  525.     set AdapterNumber = $($R4)
  526.     set AdapterServiceName = $($R5)
  527.  
  528.     Debug-Output "AdapterServiceName = "$(AdapterServiceName)
  529.  
  530.     set AdapterName = $(AdapterServiceName)
  531.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  532.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  533.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  534.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  535.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  536.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  537.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  538.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  539.         Debug-Output "ShellCode error: AddValueList FAILED  -- "$($R1)
  540.         goto ShellCodeError
  541.     endif
  542. ;VIV    shell $(UtilityInf) IncrementRefCount $(ProductKeyName)
  543.     ;
  544.     ; Add values for \SOFTWARE\Microsoft\...\NetworkCards\0...\NetRules
  545.     ;
  546.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  547.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  548.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  549.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  550.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  551.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  552.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  553.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  554.         Debug-Output "ShellCode error."
  555.         goto ShellCodeError
  556.     endif
  557.     set RegistryErrorIndex = $($R0)
  558.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  559.         EndWait
  560.         Debug-Output "Registry error: add value list."
  561.         CloseRegKey $(KeyParameters)
  562.         CloseRegKey $(KeyAdapterRules)
  563.         goto fatalregistry
  564.     endif
  565.     FlushRegKey $(KeyParameters)
  566.     FlushRegKey $(KeyAdapterRules)
  567.     CloseRegKey $(KeyParameters)
  568.     CloseRegKey $(KeyAdapterRules)
  569.     goto writeparameters
  570.  
  571. configureadapter = +
  572.     Debug-Output "******************Entering configureadapter******************"
  573.     Debug-Output "OEMNACL.INF: PortNameList = "$(PortNameList)
  574.  
  575. ;---------------------------------------------------- VIV  8/27/1993 begin
  576. ;set BusTypeNum = 3
  577.     LibraryProcedure Result, $(ACLCONF_HANDLE), +
  578.             ACLConfigEntryPoint, +
  579.                 $(!STF_HWND), +                 ;0
  580.                 $(ConfigurationTitle), +        ;1
  581.                 $(IRQDefault), +                ;2
  582.                 $(IODefault), +                 ;3
  583.                 $(CtrlList), +                  ;4
  584.                 $(AdapterName), +               ;5
  585.         $(BoardTypeDefault), +        ;6
  586.         $(BusTypeNum), +        ;7
  587.         $(MemWinDefault),   +        ;8
  588.         $(MemSizeDefault), +            ;9
  589.         $(NumOfPortsDefault), +         ;10
  590.                 $(CtrlList1), +                    ;11
  591.                 $(SlotDefault), +         ;12
  592.                 $(CtrlInterfaceList), +         ;13
  593.                 $(CtrlInterfaceList1)           ;14
  594. ;---------------------------------------------------- VIV  8/27/1993 end
  595.  
  596. ;    set Result = {     $(IRQDefault),         +
  597. ;                    $(IODefault),          +
  598. ;                    $(PortListDefault)    +
  599. ;                    $(DnlPath),         +
  600. ;                    $(MemWinDefault),   +
  601. ;                    $(MemSizeDefault)   +
  602. ;                 }
  603.     Debug-Output "Result: "$(Result)
  604.     Ifstr $(Result) == "{}"
  605.         set CommonStatus = STATUS_USERCANCEL
  606.         goto successful
  607.     Endif
  608.  
  609.     set AdapterParameters = $(Result)
  610.     read-syms UpdatingConfiguration$(!STF_LANGUAGE)
  611.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(UpdatingConfiguration)
  612.     Debug-Output "jumping to "$(from)
  613.     goto $(from)
  614.  
  615. getAdapterSettings = +
  616.     Debug-Output "******************Entering getAdapterSettings******************"
  617.     Debug-Output "from value = "$(from)
  618.  
  619.     Ifstr $(BusTypeNum) == 3
  620.     ; MCA
  621.     set BoardTypeDefault = 6    ; A100M
  622.     Else-Ifstr $(BusTypeNum) == 2
  623.     ; EISA
  624.     set BoardTypeDefault = 10    ; A100E
  625.     Else
  626.     ; ISA
  627.     set BoardTypeDefault = 12    ; A100I
  628.     Endif
  629.     Debug-Output "Default BoardType = "$(BoardTypeDefault)
  630.  
  631. ;---------------------------------------------------- VIV  8/25/1993 begin
  632. ;DEL    set IRQDefault = 5
  633. ;DEL    set IODefault = 200
  634. ;---------------------------------------------------- VIV  8/25/1993 end
  635.  
  636.     LoadLibrary "b" $(!STF_WINDOWSSYSPATH)"\"aclconf.dll ACLCONF_HANDLE
  637.  
  638. ;DEL    read-syms AdapterSettings-$(AdapterHardwareName)
  639. ;    install AdapterSettings-$(AdapterHardwareName)
  640. ;    install GetDownloadPath
  641. ;    ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  642. ;        goto fatalregistry
  643. ;    endif
  644.     Debug-Output "NTN_RegBase="$(!NTN_RegBase)
  645.     Ifstr $(!NTN_RegBase) != $(KeyNull)
  646.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) SoftwareKey
  647.         Debug-Output "Opening key "$(!NTN_RegBase)
  648.         Ifstr $(SoftwareKey) == $(KeyNull)
  649.             Debug-Output "Unable to open "$(!NTN_RegBase)" key!!!!"
  650.             goto getAdapterSettingsExit
  651.         Else
  652.             GetRegValue $(SoftwareKey), "ServiceName", ServiceNameList
  653.             set AdapterServiceName = *($(ServiceNameList),4)
  654.             set AdapterName = $(AdapterServiceName)
  655.             CloseRegKey $(SoftwareKey)
  656.         Endif
  657.     Endif
  658.  
  659.     Debug-Output "AdapterServiceName = "$(AdapterServiceName)
  660.     Debug-Output "AdapterName = "$(AdapterName)
  661.  
  662.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(AdapterServiceName) $(MAXIMUM_ALLOWED) BaseKey
  663.     Debug-Output "NTN_ServiceBase = "$(!NTN_ServiceBase)
  664.     Debug-Output "BaseKey = "$(BaseKey)
  665.     Ifstr $(BaseKey) == $(KeyNull)
  666.         Debug-Output "Error opening BaseKey "$(!NTN_ServiceBase)"\"$(AdapterServiceName)
  667.         CloseRegKey $(BaseKey)
  668.         goto fatalregistry
  669.     Endif
  670.  
  671. ;---------------------------------------------------- VIV  10/20/1993 begin
  672.     ;
  673.     ; Open \SYSTEM\CurrentControlSet\Services\aclser\Parameters
  674.     ;
  675.     OpenRegKey $(BaseKey) "" "Parameters" $(MAXIMUM_ALLOWED) ParametersKey
  676.     Ifstr $(ParametersKey) == $(KeyNull)
  677.         Debug-Output "Assuming Parameters key does not exist!!!"
  678.         CloseRegKey $(BaseKey)
  679.         goto configureadapter
  680.     Endif
  681. ;---------------------------------------------------- VIV  10/20/1993 end
  682.  
  683.  
  684. ;---------------------------------------------------- VIV  8/27/1993 begin
  685.     GetRegValue $(ParametersKey) "InterruptNumber" IRQValueList
  686.     GetRegValue $(ParametersKey) "IOBaseAddress" IOBaseValueList
  687.     GetRegValue $(ParametersKey) "MemoryWindow" MemWinValueList
  688.     GetRegValue $(ParametersKey) "WindowSize" MemSizeValueList
  689.     GetRegValue $(ParametersKey) "BoardType" BoardTypeValueList
  690.     GetRegValue $(ParametersKey) "NumOfPorts" NumOfPortsValueList
  691.     GetRegValue $(ParametersKey) "Slot" SlotValueList
  692.  
  693. ;VIV We do not need to check if IRQValueList is correct. We Will check them in DLL.
  694. ;    set-dectohex IRQDefault = *($(IRQValueList),4)
  695.     set IRQDefault = *($(IRQValueList),4)
  696.     Debug-Output "Current InterruptNumber = "$(IRQDefault)
  697.  
  698. ;    set-dectohex TmpHex = *($(IRQValueList),4)
  699. ;    Debug-Output "Current InterruptNumber = "$(TmpHex)
  700. ;    ForListDo $(IRQRangeList)
  701. ;        Ifstr(i) $(TmpHex) == "0x"$($)
  702. ;            set-sub IRQDefault = $(#),1
  703. ;        Endif
  704. ;    EndForListDo
  705.  
  706. ;VIV We do not need to check if IOBase is correct. We Will check them in DLL.
  707. ;    set-dectohex IODefault = *($(IOBaseValueList),4)
  708.     set IODefault = *($(IOBaseValueList),4)
  709.     Debug-Output "Current IOBaseAddress = "$(IODefault)
  710.  
  711. ;    set-dectohex MemWinDefault = *($(MemWinValueList),4)
  712.     set MemWinDefault = *($(MemWinValueList),4)
  713.     Debug-Output "Current Memory Window = "$(MemWinDefault)
  714.  
  715. ;    set-dectohex MemSizeDefault = *($(MemSizeValueList),4)
  716.     set MemSizeDefault = *($(MemSizeValueList),4)
  717.     Debug-Output "Current Memory Size = "$(MemSizeDefault)
  718.  
  719. ;    set-dectohex BoardTypeDefault = *($(BoardTypeValueList),4)
  720.     set BoardTypeDefault = *($(BoardTypeValueList),4)
  721.     Debug-Output "Current BoardType = "$(BoardTypeDefault)
  722.  
  723.     set SlotDefault = *($(SlotValueList),4)
  724.     Debug-Output "Current Slot = "$(SlotDefault)
  725.  
  726.     set NumOfPortsDefault = *($(NumOfPortsValueList),4)
  727.     Debug-Output "Current NumOfPorts = "$(NumOfPortsDefault)
  728. ;    set IOFound = $(FALSE)
  729. ;    set-dectohex TmpHex = *($(IOBaseValueList),4)
  730. ;    Debug-Output "Current IOBaseAddress = "$(TmpHex)
  731. ;    ForListDo $(IORangeList)
  732. ;        Ifstr(i) $(TmpHex) == "0x"$($)
  733. ;            set-sub IODefault = $(#),1
  734. ;            set IOFound = $(TRUE)
  735. ;        Endif
  736. ;    EndForListDo
  737. ;
  738. ;    ifint $(IOFound) == $(FALSE)
  739. ;      set IORangeList = {$(TmpHex)}
  740. ;      set IODefault = 0
  741. ;      set BusTypeNum = 2
  742. ;    endif
  743. ;---------------------------------------------------- VIV  8/27/1993 end
  744.  
  745. ;---------------------------------------------------- VIV  8/18/1993 begin
  746.     ;
  747.     ; Open \SYSTEM\CurrentControlSet\Services\aclser\Parameters\Line
  748.     ;
  749.     set CurrentLine = "Line"
  750.     Debug-Output "CurrentLine = "$(CurrentLine)
  751.     OpenRegKey $(ParametersKey) "" $(CurrentLine) $(MAXIMUM_ALLOWED) LineKey
  752.  
  753.  
  754.     ; Parameter for DLL
  755.     set CtrlList = {}
  756.     set CtrlInterfaceList = {}
  757.  
  758.     set PortNameList = {}
  759.     set CurrentPort = ""
  760.     set PortName = {}
  761.     set PortInterfaceList = {}
  762.     set PortInterface = {}
  763.     ForListDo {"1","2","3","4","5","6","7","8"}
  764.        set CurrentPort = "Port"$($)
  765.        ;
  766.        ; Open \SYSTEM\CurrentControlSet\Services\aclser\Parameters\Line\PortX
  767.        ;
  768.        OpenRegKey $(LineKey) "" $(CurrentPort) $(MAXIMUM_ALLOWED) PortKey
  769.        Ifstr $(PortKey) != $(KeyNull)
  770.           GetRegValue $(PortKey) "DosDevices" PortName
  771.           Ifstr $(PortNameList) == $(KeyNull)
  772.              set PortNameList = *($(PortName),4)
  773.           Else
  774.              set PortNameList = >($(PortNameList), >($(CurrentPort),*($(PortName),4)))
  775.           Endif
  776.           GetRegValue $(PortKey) "EIA422" PortInterface
  777.           Ifstr $(PortInterfaceList) == $(KeyNull)
  778.              set PortInterfaceList = *($(PortInterface),4)
  779.           Else
  780.              set PortInterfaceList = >($(PortInterfaceList), >($(CurrentPort),*($(PortInterface),4)))
  781.           Endif
  782.           CloseRegKey $(PortKey)
  783.        EndIf
  784.     EndForListDo
  785.  
  786.     set CtrlList = $(PortNameList)
  787.     set CtrlInterfaceList = $(PortInterfaceList)
  788.     set CtrlList1 = {}
  789.  
  790.     set PortNameList = {}
  791.     set CurrentPort = ""
  792.     set PortName = {}
  793.     set PortInterfaceList = {}
  794.     set PortInterface = {}
  795.     ForListDo {"9","10","11","12","13","14","15","16"}
  796.        set CurrentPort = "Port"$($)
  797.        ;
  798.        ; Open \SYSTEM\CurrentControlSet\Services\aclser\Parameters\Line\PortX
  799.        ;
  800.        OpenRegKey $(LineKey) "" $(CurrentPort) $(MAXIMUM_ALLOWED) PortKey
  801.        Ifstr $(PortKey) != $(KeyNull)
  802.           GetRegValue $(PortKey) "DosDevices" PortName
  803.           Ifstr $(PortNameList) == $(KeyNull)
  804.              set PortNameList = *($(PortName),4)
  805.           Else
  806.              set PortNameList = >($(PortNameList), >($(CurrentPort),*($(PortName),4)))
  807.           Endif
  808.           GetRegValue $(PortKey) "EIA422" PortInterface
  809.           Ifstr $(PortInterfaceList) == $(KeyNull)
  810.              set PortInterfaceList = *($(PortInterface),4)
  811.           Else
  812.              set PortInterfaceList = >($(PortInterfaceList), >($(CurrentPort),*($(PortInterface),4)))
  813.           Endif
  814.           CloseRegKey $(PortKey)
  815.        EndIf
  816.     EndForListDo
  817.  
  818.     set CtrlList1 = $(PortNameList)
  819.     set CtrlInterfaceList1 = $(PortInterfaceList)
  820.     CloseRegKey $(LineKey)
  821. ;---------------------------------------------------- VIV  8/18/1993 end
  822.  
  823.     CloseRegKey $(ParametersKey)
  824.     CloseRegKey $(BaseKey)
  825.  
  826. getAdapterSettingsExit = +
  827.     goto configureadapter
  828.  
  829. writeparameters = +
  830.     Debug-Output "******************Entering writeparameters******************"
  831.  
  832.     StartWait
  833.  
  834.     Debug-Output "Trying to open: "$(!NTN_ServiceBase)"\"$(AdapterServiceName)
  835.     Debug-Output "AdapterParameters:"
  836.     Debug-Output $(AdapterParameters)
  837.     ;
  838.     ; Open hive \SYSTEM\CurrentControlSet\Services\aclser0...
  839.     ;
  840.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(AdapterServiceName) $(MAXIMUM_ALLOWED) BaseKey
  841.     Ifstr $(BaseKey) == $(KeyNull)
  842.         Debug-Output "Error opening BaseKey "$(!NTN_ServiceBase)"\"$(AdapterServiceName)
  843.         CloseRegKey $(BaseKey)
  844.         goto fatal
  845.     Endif
  846.     ;
  847.     ; Open hive \SYSTEM\CurrentControlSet\Services\aclser0...\Parameters
  848.     ;
  849.     OpenRegKey $(BaseKey) "" "Parameters" $(MAXIMUM_ALLOWED) ParametersKey
  850.     Ifstr $(ParametersKey) == $(KeyNull)
  851.         Debug-Output "Assuming Parameters key does not exist!!!"
  852.         CloseRegKey $(BaseKey)
  853.         goto fatal
  854.     Endif
  855.  
  856. ;    Debug-Output "AdapterParameters parsed: "
  857.     set InterruptNumber = *($(AdapterParameters),1)
  858.     set IOBaseAddress = *($(AdapterParameters),2)
  859.     set HdwDeviceName = "\Device\"$(AdapterHardwareDriver)
  860. ;    set DownloadPath = *($(AdapterParameters),4)
  861.     set BoardType = *($(AdapterParameters),4)
  862.     set MemoryWindow = *($(AdapterParameters),5)
  863.     set WindowSize = *($(AdapterParameters),6)
  864.     set NumOfPorts = *($(AdapterParameters),7)
  865.     set Slot = *($(AdapterParameters),8)
  866.     Debug-Output "FOO Slot = "$(Slot)
  867.  
  868. ;    Debug-Output "InterruptNumber = "$(InterruptNumber)
  869. ;    Debug-Output "IOBaseAddress = "$(IOBaseAddress)
  870. ;    Debug-Output "HdwDeviceName = "$(HdwDeviceName)
  871. ;    Debug-Output "DownloadPath = "$(DownloadPath)
  872. ;    Debug-Output "MemoryWindow = "$(MemoryWindow)
  873. ;    Debug-Output "WindowSize = "$(WindowSize)
  874. ;    SetRegValue $(ParametersKey) {DownloadPath,$(NoTitle),$(!REG_VT_SZ),$(DownloadPath)}
  875.     SetRegValue $(ParametersKey) {NumOfPorts,$(NoTitle),$(!REG_VT_DWORD),$(NumOfPorts)}
  876.     SetRegValue $(ParametersKey) {HdwDeviceName,$(NoTitle),$(!REG_VT_SZ),$(HdwDeviceName)}
  877.     SetRegValue $(ParametersKey) {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)}
  878.     SetRegValue $(ParametersKey) {BoardType,$(NoTitle),$(!REG_VT_DWORD),$(BoardType)}
  879.     SetRegValue $(ParametersKey) {WindowSize,$(NoTitle),$(!REG_VT_DWORD),$(WindowSize)}
  880.  
  881.     ifstr $(BusTypeNum) != 3
  882.         ; ISA
  883.         SetRegValue $(ParametersKey) {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddress)}
  884.         SetRegValue $(ParametersKey) {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)}
  885.         SetRegValue $(ParametersKey) {MemoryWindow,$(NoTitle),$(!REG_VT_DWORD),$(MemoryWindow)}
  886.         ; Eisa
  887.         SetRegValue $(ParametersKey) {Slot,$(NoTitle),$(!REG_VT_DWORD),$(Slot)}
  888.     else
  889.         ; MCA
  890.         SetRegValue $(ParametersKey) {Slot,$(NoTitle),$(!REG_VT_DWORD),$(Slot)}
  891.  
  892.     endif
  893. ;---------------------------------------------------- VIV  8/18/1993 begin
  894.     set PortList = *($(AdapterParameters),3)
  895.     Debug-Output "PortList = "$(PortList)
  896.  
  897.     set LineName = "Line"
  898.     DeleteRegTree $(ParametersKey) $(LineName)
  899.  
  900.     Ifstr $(PortList) != "{}"
  901.        shell "" ExCreateRegKey $(ParametersKey) $(LineName)
  902.        Ifstr(i) $($R0) != NO_ERROR
  903.            Debug-Output "Error creating registry key!"
  904.            set KeyHandle = $($R1)
  905.            CloseRegKey $(BaseKey)
  906.            goto fatal
  907.        Endif
  908.        set LineKey = $($R1)
  909.     Endif
  910.  
  911.     ForListDo $(PortList)
  912.        set PortObject = $($)
  913.        set PortName = *($(PortObject),1)
  914.        set PortDosDevices = *($(PortObject),2)
  915.        set PortInterface = *($(PortObject),3)
  916.        Debug-Output "      "$(PortName)"  -> "$(PortDosDevices)
  917.        shell "" ExCreateRegKey $(LineKey) $(PortName)
  918.        Ifstr(i) $($R0) != NO_ERROR
  919.            Debug-Output "Error creating registry key!"
  920.            set KeyHandle = $($R1)
  921.            CloseRegKey $(LineKey)
  922.            goto fatal
  923.        Endif
  924.        set PortKey = $($R1)
  925.        SetRegValue $(PortKey) {DosDevices,$(NoTitle),$(!REG_VT_SZ),$(PortDosDevices)}
  926.        SetRegValue $(PortKey) {EIA422,$(NoTitle),$(!REG_VT_DWORD),$(PortInterface)}
  927.     EndForListDo
  928. ;---------------------------------------------------- VIV  8/18/1993 end
  929.  
  930.     EndWait
  931.     goto successful
  932.  
  933. bindingadapter = +
  934.     Debug-Output "******************Entering bindingadapter******************"
  935.     LoadLibrary "x" io8pconf.dll IO8PCONF_HANDLE
  936.     set Error = "Binding: Sorry, not yet implemented."
  937.     goto fatal
  938.  
  939. removeadapter = +
  940.     read-syms DebugOptions
  941.     Debug-Output "******************Entering removeadapter******************"
  942.     Debug-Output "OEMNACL.INF: removeadapter"
  943.     Debug-Output "OEMNACL.INF: Removing Hardware Components"
  944.     Debug-Output "OEMNACL.INF: ProductSoftwareNameHdwDriver = "$(ProductSoftwareNameHdwDriver)
  945.     Debug-Output "OEMNACL.INF: NTN_RegBase = "$(!NTN_RegBase)
  946.     Debug-Output "fRemoveACL: "$(fRemoveACL)
  947.  
  948.     ifstr(i) $(fRemoveACL) == FALSE
  949.       install RemoveFiles
  950.       goto removeadapterExit
  951.     endif
  952.  
  953. ;DEL    LoadLibrary "x" aclconf.dll ACLCONF_HANDLE
  954.  
  955.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  956.         $(ProductSoftwareNameHdwDriver), $(!NTN_RegBase)
  957.     Debug-Output "OEMNACL.INF: RemoveHardwareComponent return value = "$($R0)
  958.  
  959.     Ifstr(i) $($R0) != NO_ERROR
  960.         Debug-Output "OEMNACL.INF: RemoveHardwareComponent != NO_ERROR"
  961.     Endif
  962.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  963.         Debug-Output "ShellCode error"
  964.         goto ShellCodeError
  965.     endif
  966.     set RegistryErrorIndex = $($R0)
  967.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  968.         Debug-Output "fatal registry error"
  969.         goto fatalregistry
  970.     endif
  971.  
  972.     install RemoveFiles
  973.  
  974. removeadapterExit = +
  975.     Debug-Output "OEMNACL.INF: Exiting removeadapter"
  976.     goto end
  977.  
  978. UpgradeSoftware = +
  979.     Debug-Output "******************Entering UpgradeSoftware******************"
  980.     set SrcDir = $(!SourceDir)
  981. ;    Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  982. ;    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  983. ;        Debug-Output "Shell code error: DoAskSource"
  984. ;        Goto ShellCodeError
  985. ;    Else-Ifstr(i) $($R0) == STATUS_FAILED
  986. ;        Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  987. ;        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  988. ;            goto ShellCodeError
  989. ;        endif
  990. ;        set Error = $($R0)
  991. ;        Goto fatal
  992. ;    Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  993. ;        set CommonStatus = STATUS_USERCANCEL
  994. ;        Goto successful
  995. ;    Endif
  996. ;    Set SrcDir = $($R1)
  997.     install Correct-SrcDir
  998. ;    Shell $(UtilityInf), GetBusTypeNum
  999. ;    set BusTypeNum = $($R1)
  1000. ;DEL pd    LoadLibrary "c" $(SrcDir)aclconf.dll ACLCONF_HANDLE
  1001.  
  1002. ;VIV    ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1003.     Debug-Output "ProductKeyNameHdwDriver = "$(ProductKeyNameHdwDriver)
  1004.     Debug-Output "NTN_RegBase = "$(!NTN_RegBase)
  1005.  
  1006.     ifstr(i) $(ProductKeyNameHdwDriver) == $(!NTN_RegBase)
  1007. ; We will never get here - VD
  1008. ;VIV        OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1009. ;DEL        OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyNameHdwDriver) $(MAXIMUM_ALLOWED) KeyProduct
  1010. ;DEL        Ifstr $(KeyProduct) != $(KeyNull)
  1011. ;DEL            GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1012. ;DEL            set Version = *($(VersionInfo), 4)
  1013. ;DEL            Split-String $(!NTN_Infname), "\", FilenameList
  1014. ;DEL            QueryListSize ListSize $(FilenameList)
  1015. ;DEL            set !UG_Filename = *($(FilenameList), $(ListSize))
  1016. ;DEL            install "Install-Update"
  1017. ;DEL            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1018. ;DEL                goto fatal
  1019. ;DEL            endif
  1020. ;DEL            SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1021. ;DEL            SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1022. ;DEL;VIV            ifint $(Version) != $(ProductVersion)
  1023. ;DEL            ifint $(Version) != $(ProductVersionHdwDriver)
  1024. ;DEL            endif
  1025. ;DEL            CloseRegKey $(KeyProduct)
  1026. ;DEL        else
  1027. ;DEL            goto fatalregistry
  1028. ;DEL        endif
  1029.     else
  1030.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1031.               $(MAXIMUM_ALLOWED) NetworkCardKey
  1032.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1033.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1034.             set ServiceName = *($(ServiceNameInfo), 4)
  1035.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1036.                 $(MAXIMUM_ALLOWED) NetRuleKey
  1037.             Ifstr $(NetRuleKey) != $(KeyNull)
  1038.             else
  1039.                 goto fatalregistry
  1040.             endif
  1041.             CloseRegKey $(NetRules)
  1042.             CloseRegKey $(NetworkCardKey)
  1043.         else
  1044.             goto fatalregistry
  1045.         endif
  1046.         OpenRegKey $(!REG_H_LOCAL) "" +
  1047.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  1048.               $(MAXIMUM_ALLOWED) ServiceKey
  1049.         Ifstr $(ServiceKey) != $(KeyNull)
  1050.             ;
  1051.             ; Expand and copy files to the windows directory
  1052.             ;
  1053.             install "Install-Option"
  1054.             ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  1055.                   Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  1056.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1057.                       goto ShellCodeError
  1058.                   endif
  1059.                   set Error = $($R0)
  1060.                   goto fatal
  1061.             endif
  1062.         LoadLibrary "d" $(!STF_WINDOWSSYSPATH)"\"aclconf.dll ACLCONF_HANDLE
  1063.         ;
  1064.         ; Copy the Control Programs that have already been expanded
  1065.         ; to the Registry
  1066.         ;
  1067.             LibraryProcedure Result, $(ACLCONF_HANDLE), +
  1068.                             ACLPutCPDataToRegistry, +
  1069.                             $(!STF_WINDOWSSYSPATH)"\", +
  1070.                             $(ParamKeyName), +
  1071.                             $(BusTypeNum)
  1072.         ;
  1073.         ; Remove the Control Programs from windows directory
  1074.         ;
  1075.         set RemoveList = {}
  1076.         set CPList = ^( Files-CP, 2 )
  1077.            ForListDo $(CPList)
  1078.                 set RemoveList = >($(RemoveList), $(!STF_WINDOWSSYSPATH)\$($))
  1079.            EndForListDo
  1080.         ForListDo $(RemoveList)
  1081.                 LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  1082.         EndForListDo
  1083.  
  1084.             CloseRegKey $(ServiceKey)
  1085.             set AddCopy = YES
  1086.             set DoCopy = YES
  1087. ;DEL pd            install "Install-Option"
  1088. ;               Debug-Output "OEMNACL.INF: STF_INSTALL_OUTCOME = "$(STF_INSTALL_OUTCOME)
  1089. ;DEL pd            ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  1090. ;DEL pd                  Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  1091. ;DEL pd                  ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1092. ;DEL pd                      goto ShellCodeError
  1093. ;DEL pd                  endif
  1094. ;DEL pd                  set Error = $($R0)
  1095. ;DEL pd                  goto fatal
  1096. ;DEL pd            endif
  1097.         else
  1098.             goto fatalregistry
  1099.         endif
  1100.     endif
  1101.     goto end
  1102.  
  1103. successful = +
  1104.     Debug-Output "******************Entering successful******************"
  1105.     goto end
  1106.  
  1107. ; ---------------------------------------------------- VIV  8/18/1993 begin
  1108. ; abandon = +
  1109. ;     Debug-Output "******************Entering abandon******************"
  1110. ;
  1111. ;     ForListDo $(OEM_ABANDON_OPTIONS)
  1112. ;         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1113. ;             $(ProductSoftwareName), $($)
  1114. ;         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1115. ;             Debug-Output "ShellCode error"
  1116. ;             goto ShellCodeError
  1117. ;         endif
  1118. ;         set RegistryErrorIndex = $($R0)
  1119. ;         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1120. ;             goto fatalregistry
  1121. ;         endif
  1122. ;     EndForListDo
  1123. ;
  1124. ;     goto end
  1125. ;---------------------------------------------------- VIV  8/18/1993 end
  1126.  
  1127. warning = +
  1128.     Debug-Output "******************Entering warning******************"
  1129.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1130.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1131.         goto ShellCodeError
  1132.     endif
  1133.     ifstr(i) $($R1) == "OK"
  1134.         goto $(to)
  1135.     else-ifstr(i) $($R1) == "CANCEL"
  1136.         goto $(from)
  1137.     else
  1138.         goto "end"
  1139.     endif
  1140.  
  1141. nonfatalinfo = +
  1142.     Debug-Output "******************Entering nonfatalinfo******************"
  1143.     Set CommonStatus = STATUS_USERCANCEL
  1144.     Set Severity = STATUS
  1145.     goto nonfatalmsg
  1146.  
  1147. nonfatal = +
  1148.     Debug-Output "******************Entering nonfatal******************"
  1149.     Set Severity = NONFATAL
  1150.     goto nonfatalmsg
  1151.  
  1152. nonfatalmsg = +
  1153.     Debug-Output "******************Entering nonfatalmsg******************"
  1154.     ifstr(i) $(Error) == ""
  1155.         Set Severity = NONFATAL
  1156.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1157.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1158.             goto ShellCodeError
  1159.         endif
  1160.         set Error = $($R0)
  1161.     endif
  1162.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1163.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1164.         goto ShellCodeError
  1165.     endif
  1166.     ifstr(i) $($R1) == "OK"
  1167.         goto $(from)
  1168.     else
  1169.         goto "end"
  1170.     endif
  1171.  
  1172. fatalregistry = +
  1173.     Debug-Output "******************Entering fatalregistry******************"
  1174.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1175.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1176.        Debug-Output "fatalregistry: shell to find RegistryErrorString failed."
  1177.        goto ShellCodeError
  1178.     endif
  1179.     set Error = $($R0)" - service "$(IO8PSpecificString)"."
  1180.     ifstr(i) $(fRemoveIO8P) == TRUE
  1181.         read-syms AbortMessage$(!STF_LANGUAGE)
  1182.         set Error = $(Error)$(!LF)$(!LF)$(AbortText)
  1183.     endif
  1184.     goto fatal
  1185.  
  1186. fataldetect = +
  1187.     Debug-Output "******************Entering fataldetect******************"
  1188.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1189.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1190.         Debug-Output "ShellCode error: cannot get an error string."
  1191.         goto ShellCodeError
  1192.     endif
  1193.     set Error = $($R0)
  1194.     Goto fatal
  1195.  
  1196. fatal = +
  1197.     Debug-Output "******************Entering fatal******************"
  1198.     Debug-Output "OEMNIO8P.INF: ---- fatal called"
  1199.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1200.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1201.         Debug-Output "fatal: shell to SetupMessage failed."
  1202.         goto ShellCodeError
  1203.     endif
  1204.     goto setfailed
  1205.  
  1206. ShellCodeError = +
  1207.     Debug-Output "******************Entering ShellCodeError******************"
  1208.     set DlgType      = "MessageBox"
  1209.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  1210.     set STF_MB_TEXT  = "Shell Code Error"
  1211.     set STF_MB_TYPE  = 1
  1212.     set STF_MB_ICON  = 3
  1213.     set STF_MB_DEF   = 1
  1214.     ui start "Error Message"
  1215.     goto setfailed
  1216.  
  1217. setfailed = +
  1218.     Debug-Output "******************Entering setfailed******************"
  1219.     set CommonStatus = STATUS_FAILED
  1220.     ifstr(i) $(fRemoveIO8P) == TRUE
  1221.         set fRemoveIO8P = FALSE
  1222.         goto removeadapter
  1223.     endif
  1224.     goto end
  1225.  
  1226. end = +
  1227.     Debug-Output "******************Entering end******************"
  1228.     goto term
  1229.  
  1230. term = +
  1231.     ifstr(i) $(ACLCONF_HANDLE) != $(HandleNull)
  1232.       FreeLibrary $(ACLCONF_HANDLE)
  1233.     endif
  1234.     Debug-Output "******************Entering term -- GoodBye!!!******************"
  1235.     Return $(CommonStatus)
  1236.  
  1237. [RemoveFiles]
  1238.     Debug-Output "******************Entering [RemoveFiles]******************"
  1239.     set RemoveList = {}
  1240.     set RenameList = {}
  1241.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyNameHdwDriver) +
  1242.                $(MAXIMUM_ALLOWED) KeyProductHdwDriver
  1243.     Debug-Output "ProductKeyNameHdwDriver = "$(ProductKeyNameHdwDriver)
  1244.     Debug-Output "KeyProductHdwDriver = "$(KeyProductHdwDriver)
  1245.     ifstr $(KeyProductHdwDriver) == $(KeyNull)
  1246.            CloseRegKey $(KeyProductHdwDriver)
  1247.            set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\drivers\"$(AdapterHardwareDriver)".sys")
  1248.  
  1249. ;---------------------------------------------------- VIV  8/18/1993 begin
  1250. ;      set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\aclconf.dll")
  1251.         set ResList = ^( Files-Resource, 2 )
  1252.            ForListDo $(ResList)
  1253.             set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)\$($))
  1254.            EndForListDo
  1255.  
  1256. ;      set RemoveList = >($(RemoveList), $(!STF_WINDOWSSYSPATH)"\io8pconf.hlp")
  1257. ;        set CPList = ^( Files-CP, 2 )
  1258. ;           ForListDo $(CPList)
  1259. ;            set RemoveList = >($(RemoveList), $(!STF_WINDOWSSYSPATH)\$($))
  1260. ;           EndForListDo
  1261.         set RemoveList = >($(RemoveList), $(!STF_WINDOWSSYSPATH)"\drivers\"$(AdapterHardwareDriver)".old")
  1262. ;---------------------------------------------------- VIV  8/18/1993 end
  1263.     endif
  1264.  
  1265. ;---------------------------------------------------- VIV  8/18/1993 begin
  1266. ;   OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) +
  1267. ;              $(MAXIMUM_ALLOWED) KeyProduct
  1268. ;   ifstr $(KeyProduct) == $(KeyNull)
  1269. ;      CloseRegKey $(KeyProduct)
  1270. ;      set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\drivers\"$(ProductSoftwareName)".sys")
  1271. ;      set RenameList = >($(RenameList), $(!STF_WINDOWSSYSPATH)"\io8pconf.dll")
  1272. ;      set RemoveList = >($(RemoveList), $(!STF_WINDOWSSYSPATH)"\io8pconf.hlp")
  1273. ;   endif
  1274. ;---------------------------------------------------- VIV  8/18/1993 end
  1275.  
  1276.    Debug-Output "RemoveList = "$(RemoveList)
  1277.    Debug-Output "RenameList = "$(RenameList)
  1278.  
  1279.    ForListDo $(RemoveList)
  1280.        Debug-Output "Removing "$($)
  1281.        LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  1282.        Debug-Output "Status is "$(Status)
  1283.    EndForListDo
  1284.  
  1285.    ForListDo $(RenameList)
  1286.        Debug-Output "RenameList entry = "$($)
  1287.        Split-String $($) "\" FilePath
  1288.        QueryListSize PathLen $(FilePath)
  1289.        Split-String *($(FilePath),$(PathLen)) "." FullFileName
  1290.        Set FileName = *($(FullFileName),1)
  1291.        Debug-Output "FileName is "$(FileName)
  1292.        LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1293.        Debug-Output "CheckFile Status = "$(STATUS)
  1294.        ifstr(i) $(STATUS) == YES
  1295.            LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1296.            Debug-Output "Delfile Status = "$(STATUS)
  1297.            LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $($)
  1298.            Debug-Output "Delfile Status = "$(STATUS)
  1299. ;       endif
  1300.        else-Ifstr(i) $(fRemoveACL) == TRUE
  1301.          Debug-Output "Renaming from "$($)
  1302.          Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1303.          LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1304.          Debug-Output "Status is "$(Status1)
  1305.          AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  1306.        endif
  1307.    EndForListDo
  1308.  
  1309.    exit
  1310.  
  1311. [ExCreateRegKey]
  1312. ;    Debug-Output "******************Entering [ExCreateRegKey]******************"
  1313.     set ECR_Result          = NO_ERROR
  1314.     set ECR_BaseKeyHandle   = $($0)
  1315.     set ECR_NewPath         = $($1)
  1316.     set KeyNull         = ""
  1317.     set MAXIMUM_ALLOWED   = 33554432
  1318. ;    Debug-Output "ExCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
  1319. ;    Debug-Output "                 ECR_NewPath = "$(ECR_NewPath)
  1320. ;    Debug-Output "                 MAXIMUM_ALLOWED = "$(MAXIMUM_ALLOWED)
  1321. ;    Debug-Output "                 KeyNull = "$(KeyNull)
  1322.     OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
  1323.                ECR_BaseKey
  1324. ;    Debug-Output "ECR_BaseKey = "$(ECR_BaseKey)
  1325. ;    Debug-Output "    OpenRegKey returned "$($R0)
  1326.     Ifstr $(ECR_BaseKey) == $(KeyNull)
  1327. ;        Debug-Output "ECR_BaseKey == KeyNull"
  1328.     Else
  1329. ;        Debug-Output "ECR_BaseKey != KeyNull"
  1330.         set ECR_KeyHandle = $(ECR_BaseKey)
  1331.         goto  ECR_Return
  1332.     Endif
  1333.     set ECR_TmpPath = ""
  1334.     Split-String $(ECR_NewPath) "\" ECR_PList
  1335. ;    Debug-Output "ECR_PList = "$(ECR_PList)
  1336.     ForListDo $(ECR_PList)
  1337.         Ifstr(i) $($) != "\"
  1338.             Ifint $(#) == 1
  1339.                 set ECR_TmpPath = $($)
  1340.             Else
  1341.                 set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
  1342.             Endif
  1343. ;            Debug-Output "Determining if "$(ECR_TmpPath)" exists"
  1344.             OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
  1345.             Ifstr $(ECR_BaseKey) == $(KeyNull)
  1346.  ;               Debug-Output "Creating "$(ECR_TmpPath)
  1347.                 CreateRegKey $(ECR_BaseKeyHandle)  {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
  1348.                 Ifstr(i) $(ECR_KeyHandle) == $(KeyNull)
  1349.                     set ECR_Result = $($R0)
  1350.                     goto ECR_Return
  1351.                 Endif
  1352.             Endif
  1353.         Endif
  1354.     EndForListDo
  1355. ECR_Return = +
  1356.     return $(ECR_Result) $(ECR_KeyHandle)
  1357.  
  1358. [DebugExternalGlobals]
  1359.     Set InfName = "OEMNACL.INF"
  1360.     Debug-Output $(InfName)" NTN_Origination = "$(!NTN_Origination)
  1361.     Debug-Output $(InfName)" NTN_InstallMode = "$(!NTN_InstallMode)
  1362.     Debug-Output $(InfName)" NTN_RegBase = "$(!NTN_RegBase)
  1363.     Debug-Output $(InfName)" NTN_SoftwareBase = "$(!NTN_SoftwareBase)
  1364.     Debug-Output $(InfName)" NTN_ServiceBase = "$(!NTN_ServiceBase)
  1365.     Debug-Output $(InfName)" STF_NTPATH = "$(!STF_NTPATH)
  1366.     Debug-Output $(InfName)" STF_NTWINDOWSSYSPATH = "$(!STF_WINDOWSSYSPATH)
  1367.     Debug-Output $(InfName)" STF_CWDIR = "$(!STF_CWDIR)
  1368.     Debug-Output $(InfName)" STF_LANGUAGE = "$(!STF_LANGUAGE)
  1369.     Debug-Output $(InfName)" STF_NCDETECT  = "$(!STF_NCDETECT)
  1370.     Debug-Output $(InfName)" STF_NCOPTION  = "$(!STF_NCOPTION)
  1371.     Debug-Output $(InfName)" STF_NCDETCARD = "$(!STF_NCDETCARD)
  1372.     Debug-Output $(InfName)" STF_NCDETINFO = "$(!STF_NCDETINFO)
  1373.     Debug-Output $(InfName)" STF_INSTALL_MODE = "$(!STF_INSTALL_MODE)
  1374.     Debug-Output $(InfName)" STF_CONTEXTINFNAME = "$(!STF_CONTEXTINFNAME)
  1375.     return
  1376.  
  1377. ;DEL [DebugConfiguration]
  1378. ;DEL     Set InfName = "OEMNIO8P.INF"
  1379. ;DEL     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  1380. ;DEL     Debug-Output $(InfName)" IRQ_Level is "$(!p:IRQ_Level)
  1381. ;DEL     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  1382. ;DEL     Debug-Output $(InfName)" TransceiverValue is "$(!p:TransceiverValue)
  1383. ;DEL     Debug-Output $(InfName)" MemBaseAddrDec is "$(!p:MemBaseAddrDec)
  1384. ;DEL     Debug-Output $(InfName)" MappedValue is "$(!p:MappedValue)
  1385. ;DEL     return
  1386.  
  1387. [AdapterSettings-aclser]
  1388.     set IRQDefault = 5
  1389.     set-hextodec IODefault = 200
  1390. ;    set DnlPath = "\Device\Harddisk1\Partition2\WINNT\"
  1391.     set-hextodec MemWinDefault = 0xEC000
  1392.     set MemSizeDefault = 16
  1393.     set PortListDefault =     {                        +
  1394.                                 { Port1, COM3 },    +
  1395.                                 { Port2, COM4 }     +
  1396.                             }
  1397.     Exit
  1398.  
  1399. [GetDownloadPath]
  1400.     set STF_INSTALL_OUTCOME = STF_FAILED
  1401.     set KeyName = "System\CurrentControlSet\Control\hivelist"
  1402.     OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(MAXIMUM_ALLOWED) KeyHandle
  1403.     Debug-Output "Opening key "$(KeyName)
  1404.     Ifstr $(KeyHandle) == $(KeyNull)
  1405.         Debug-Output "Unable to open "$(KeyName)" key!!!!"
  1406.     Else
  1407.         set Value = "\REGISTRY\MACHINE\SYSTEM"
  1408.         GetRegValue $(KeyHandle), $(Value), SystemPathList
  1409.         ifstr $(SystemPathList) == ""
  1410.             Debug-Output "Cannot get value for "$(Value)
  1411.         else
  1412.             Debug-Output "SystemPathList = "$(SystemPathList)
  1413.             set SystemPath = *($(SystemPathList), 4)
  1414.             Debug-Output "SystemPath = "$(SystemPath)
  1415.             Split-String $(SystemPath), "\", PathPartsList
  1416.             set DnlPath = ""
  1417.             ForListDo $(PathPartsList)
  1418.                 Ifstr(i) $($) == CONFIG
  1419.                     goto PathDone
  1420.                 Endif
  1421.                 set DnlPath = $(DnlPath)$($)
  1422.             EndForListDo
  1423. PathDone = +
  1424. ;            set DnlPath = $(DnlPath)\
  1425.             Debug-Output "DnlPath = "$(DnlPath)
  1426.             set STF_INSTALL_OUTCOME = STF_SUCCESS
  1427.         endif
  1428.         CloseRegKey $(KeyHandle)
  1429.     Endif
  1430.  
  1431.     Exit
  1432.  
  1433.  
  1434. [BindingInfo-aclser]
  1435. BindingInfo     = {+
  1436.                   $(AdapterHardwareDriver)"Driver "$(AdapterHardwareDriver)"Adapter non exclusive 100" +
  1437.                   }
  1438.  
  1439. ;---------------------------------------------------- VIV  8/31/1993 begin
  1440. ;[InstallResources]
  1441. ;    set STF_VITAL = ""
  1442. ;    Debug-Output "OEMNIO8P.INF: [InstallResources]"
  1443. ;    AddSectionFilesToCopyList Files-Resource $(!SourceDir) $(!STF_WINDOWSSYSPATH)
  1444. ;    CopyFilesInCopyList
  1445. ;    Debug-Output "OEMNIO8P.INF: [InstallResources] - Exiting"
  1446. ;    exit
  1447. ;---------------------------------------------------- VIV  8/31/1993 end
  1448.  
  1449. ;-----------------------------------------------------------------------
  1450. ; Copy Files from installation disk.
  1451. ;-----------------------------------------------------------------------
  1452. [Install-Option]
  1453.     set STF_VITAL = VITAL
  1454.     Debug-Output "OEMNACL.INF: SystemPath = "$(!STF_WINDOWSSYSPATH)
  1455.     AddSectionFilesToCopyList Files-CP $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1456.     ifstr(i) $(AddCopy) == "YES"
  1457.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1458.         AddSectionFilesToCopyList Files-Resource $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1459.     endif
  1460.     ifstr(i) $(DoCopy) == "YES"
  1461.         set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1462.         Debug-Output "OEMNACL.INF: About to copy files"
  1463.         CopyFilesInCopyList
  1464.     else
  1465.         LibraryProcedure STATUS,$(!LIBHANDLE), CopySingleFile $(SrcDir)\ACLCONF.dll $(!STF_WINDOWSSYSPATH)\ACLCONF.dll
  1466.         LibraryProcedure STATUS,$(!LIBHANDLE), CopySingleFile $(SrcDir)\ACLCONF.hlp $(!STF_WINDOWSSYSPATH)\ACLCONF.hlp
  1467.     endif
  1468.     ifstr(i) $(DoConfig) == "YES"
  1469.     endif
  1470.     Exit
  1471.  
  1472. [Source Media Descriptions]
  1473.     1  = "NT Drvlib"
  1474. ;DEL    2  = "Windows NT Setup CD-ROM Disk"  
  1475.  
  1476. [Signature]
  1477.     FileType = MICROSOFT_DRVLIB_FILE
  1478. [GetSignature]
  1479.     read-syms Signature
  1480.     return $(FileType)
  1481.  
  1482. [ProductType]
  1483. STF_PRODUCT  = Winnt
  1484. STF_PLATFORM = I386
  1485.  
  1486. ;DEL [Files-Inf]
  1487. ;DEL 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  1488.  
  1489. [Files-aclser]
  1490. 1,    aclser.sys     , SIZE=90664
  1491.  
  1492. [Files-Resource]
  1493. 1,    ACLCONF.DLL , SIZE=93760
  1494. 1,    ACLCONF.HLP , SIZE=20760
  1495. ;DEL 1,    STARGATE.BMP , SIZE=21760
  1496.  
  1497. [Files-CP]
  1498. 1,    acl.cp         , SIZE=5460
  1499. 1,    acl2.cp     , SIZE=5482
  1500. 1,    acl2r.cp     , SIZE=5366
  1501. 1,    aclmc.cp     , SIZE=5366
  1502. 1,    a100m.cp     , SIZE=5366
  1503. 1,    a100e.cp     , SIZE=5366
  1504. 1,    a100i.cp     , SIZE=5366
  1505. 1,    aclmcp.cp     , SIZE=5366
  1506.  
  1507. [OptionsTextENG]
  1508.     aclser          = "Star Gate ACL/Avanstar Family Adapter"
  1509.  
  1510. [FileConstantsENG]
  1511.     ProCaption   = "Star Gate Setup"
  1512.     ProCancel    = "Cance&l"
  1513.     ProCancelMsg = "Star Gate Adapters and/or Drivers are not correctly installed. "+
  1514.                    "Are you sure you want to cancel copying files?"
  1515.     ProCancelCap = "Star Gate Setup Message"
  1516.     ProText1     = "Copying:"
  1517.     ProText2     = "To:"
  1518.     Error         = "Unable to determine proper source disk location; copy cannot be performed."
  1519.     FunctionTitle   ="Star Gate Setup"
  1520.     ProductSoftwareDescriptionHdwDriver = "StarGate "$(AdapterTitle)" Driver"
  1521.     ProductSoftwareTitleHdwDriver = "StarGate "$(AdapterTitle)" Driver"
  1522.     ConfigurationTitle = "Star Gate "$(AdapterTitle)" Adapter Setup"
  1523.     ProductHardwareDescription      = "StarGate "$(AdapterTitle)" Adapter"
  1524.     ProductHardwareTitle        = "StarGate "$(AdapterTitle)" Adapter"
  1525.  
  1526. [DialogConstantsENG]
  1527.     Help        = "&Help"
  1528.     Exit        = "E&xit"
  1529.     OK          = "OK"
  1530.     HelpContext = ""
  1531.     Continue    = "C&ontinue"
  1532.     Cancel      = "C&ancel"
  1533.  
  1534. [UpdatingConfigurationENG]
  1535.     UpdatingConfiguration      = "Updating new configuration..."
  1536.  
  1537. [AbortMessageENG]
  1538.   AbortText  =  "Aborting Specialix Setup. Please reboot the system "+
  1539.                 "to fix the problem."
  1540.  
  1541. ; Terminates SrcDir with '\' if it isn't
  1542. [Correct-SrcDir]
  1543. Debug-Output "OEMNACL.INF: SrcDir was "$(SrcDir)
  1544. split-string $(SrcDir) "\" SrcList
  1545. QueryListSize SrcListSize $(SrcList)
  1546. Debug-Output "OEMNACL.INF: List = "$(SrcList)
  1547. Debug-Output "OEMNACL.INF: ListSize = "$(SrcListSize)
  1548. Debug-Output "OEMNACL.INF: LastItem = "*($(SrcList), $(SrcListSize) )
  1549. ifstr *($(SrcList), $(SrcListSize) ) != "\"
  1550.     set SrcDir = $(SrcDir)\
  1551. endif
  1552. Debug-Output "OEMNACL.INF: SrcDir is "$(SrcDir)
  1553. exit
  1554.